+2004-02-28 Hans Breuer <hans@breuer.org>
+
+ * gdk/win32/gdkdnd-win32.c : set current_dest_drag to NULL
+ when destroying, fixes bug #120007. Also removed the mirrored
+ ref counting for deprecated gdk_drag_context_<ref|unref>()
+ cause it wasn't reliable anymore anyway.
+
+ * gdk/win32/gdkdisplay-win32.c : fix typo, which should
+ have broken the win32 build for everyone not using msvc
+
+ * gdk/win32/gdkevents-win32.c : WM_GETMINAMXINFO ensure not to
+ return negative values for ptMaxTrackSize, it caused snapping
+ windows to their minimum size
+
Sat Feb 28 01:39:01 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcombobox.c (gtk_combo_box_set_wrap_width): Support
+2004-02-28 Hans Breuer <hans@breuer.org>
+
+ * gdk/win32/gdkdnd-win32.c : set current_dest_drag to NULL
+ when destroying, fixes bug #120007. Also removed the mirrored
+ ref counting for deprecated gdk_drag_context_<ref|unref>()
+ cause it wasn't reliable anymore anyway.
+
+ * gdk/win32/gdkdisplay-win32.c : fix typo, which should
+ have broken the win32 build for everyone not using msvc
+
+ * gdk/win32/gdkevents-win32.c : WM_GETMINAMXINFO ensure not to
+ return negative values for ptMaxTrackSize, it caused snapping
+ windows to their minimum size
+
Sat Feb 28 01:39:01 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcombobox.c (gtk_combo_box_set_wrap_width): Support
+2004-02-28 Hans Breuer <hans@breuer.org>
+
+ * gdk/win32/gdkdnd-win32.c : set current_dest_drag to NULL
+ when destroying, fixes bug #120007. Also removed the mirrored
+ ref counting for deprecated gdk_drag_context_<ref|unref>()
+ cause it wasn't reliable anymore anyway.
+
+ * gdk/win32/gdkdisplay-win32.c : fix typo, which should
+ have broken the win32 build for everyone not using msvc
+
+ * gdk/win32/gdkevents-win32.c : WM_GETMINAMXINFO ensure not to
+ return negative values for ptMaxTrackSize, it caused snapping
+ windows to their minimum size
+
Sat Feb 28 01:39:01 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcombobox.c (gtk_combo_box_set_wrap_width): Support
+2004-02-28 Hans Breuer <hans@breuer.org>
+
+ * gdk/win32/gdkdnd-win32.c : set current_dest_drag to NULL
+ when destroying, fixes bug #120007. Also removed the mirrored
+ ref counting for deprecated gdk_drag_context_<ref|unref>()
+ cause it wasn't reliable anymore anyway.
+
+ * gdk/win32/gdkdisplay-win32.c : fix typo, which should
+ have broken the win32 build for everyone not using msvc
+
+ * gdk/win32/gdkevents-win32.c : WM_GETMINAMXINFO ensure not to
+ return negative values for ptMaxTrackSize, it caused snapping
+ windows to their minimum size
+
Sat Feb 28 01:39:01 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcombobox.c (gtk_combo_box_set_wrap_width): Support
+2004-02-28 Hans Breuer <hans@breuer.org>
+
+ * gdk/win32/gdkdnd-win32.c : set current_dest_drag to NULL
+ when destroying, fixes bug #120007. Also removed the mirrored
+ ref counting for deprecated gdk_drag_context_<ref|unref>()
+ cause it wasn't reliable anymore anyway.
+
+ * gdk/win32/gdkdisplay-win32.c : fix typo, which should
+ have broken the win32 build for everyone not using msvc
+
+ * gdk/win32/gdkevents-win32.c : WM_GETMINAMXINFO ensure not to
+ return negative values for ptMaxTrackSize, it caused snapping
+ windows to their minimum size
+
Sat Feb 28 01:39:01 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkcombobox.c (gtk_combo_box_set_wrap_width): Support
g_assert (_gdk_display == display);
}
-#ifdef HVAE_MONITOR_INFO
+#ifdef HAVE_MONITOR_INFO
static BOOL CALLBACK
count_monitor (HMONITOR hmonitor,
HDC hdc,
* this is used on both source and destination sides.
*/
struct _GdkDragContextPrivateWin32 {
- gint ref_count;
-
guint16 last_x; /* Coordinates from last event */
guint16 last_y;
HWND dest_xid;
GdkDragContextPrivateWin32 *private = g_new0 (GdkDragContextPrivateWin32, 1);
dragcontext->windowing_data = private;
- private->ref_count = 1;
contexts = g_list_prepend (contexts, dragcontext);
}
{
GdkDragContext *context = GDK_DRAG_CONTEXT (object);
GdkDragContextPrivateWin32 *private = GDK_DRAG_CONTEXT_PRIVATE_DATA (context);
-
+
+ GDK_NOTE (DND, g_print ("gdk_drag_context_finalize\n"));
+
g_list_free (context->targets);
if (context->source_window)
contexts = g_list_remove (contexts, context);
+ if (context == current_dest_drag)
+ current_dest_drag = NULL;
+
g_free (private);
G_OBJECT_CLASS (parent_class)->finalize (object);
{
g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
- GDK_NOTE (DND, g_print ("gdk_drag_context_ref: %p %d\n", context, G_OBJECT(context)->ref_count));
-
g_object_ref (context);
}
{
g_return_if_fail (GDK_IS_DRAG_CONTEXT (context));
- GDK_NOTE (DND, g_print ("gdk_drag_context_unref: %p %d\n", context, G_OBJECT(context)->ref_count));
g_object_unref (context);
}
GdkDragContextPrivateWin32 *private;
private = GDK_DRAG_CONTEXT_PRIVATE_DATA (current_dest_drag);
+ /* Pass ownership of context to the event */
tmp_event.dnd.type = GDK_DROP_START;
tmp_event.dnd.window = current_dest_drag->dest_window;
tmp_event.dnd.send_event = FALSE;
tmp_event.dnd.x_root = private->last_x;
tmp_event.dnd.y_root = private->last_y;
+ current_dest_drag = NULL;
+
gdk_event_put (&tmp_event);
}
g_return_if_fail (context != NULL);
- GDK_NOTE (DND, g_print ("gdk_drop_finish\n"));
+ GDK_NOTE (DND, g_print ("gdk_drop_finish"));
private = GDK_DRAG_CONTEXT_PRIVATE_DATA (context);
if (impl->hint_flags & GDK_HINT_MAX_SIZE)
{
+ int maxw, maxh;
+
rect.left = rect.top = 0;
rect.right = impl->hints.max_width;
rect.bottom = impl->hints.max_height;
_gdk_win32_adjust_client_rect (window, &rect);
- mmi->ptMaxTrackSize.x = rect.right - rect.left;
- mmi->ptMaxTrackSize.y = rect.bottom - rect.top;
+ /* at least on win9x we have the 16 bit trouble */
+ maxw = rect.right - rect.left;
+ maxh = rect.bottom - rect.top;
+ mmi->ptMaxTrackSize.x = maxw > 0 && maxw < G_MAXSHORT ? maxw : G_MAXSHORT;
+ mmi->ptMaxTrackSize.y = maxh > 0 && maxh < G_MAXSHORT ? maxw : G_MAXSHORT;
}
if (impl->hint_flags & (GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE))